package com.fun.feifun.modules.business.constant;


public enum OrderPayStatusEnum {
    payment("充值中",0),
    PaySuccess("充值成功",1),
    PayFail("充值失败",-1)
    ;

    private String title;
    private Integer value;


    OrderPayStatusEnum(String title, Integer value){
        this.title=title;
        this.value=value;
    }

    // 根据key获取value的方法
    public static String getTitleByValue(Integer value){
        for (OrderPayStatusEnum status : OrderPayStatusEnum.values()) {
            if (status.getValue().equals(value)) {
                return status.getTitle();
            }
        }
        return ""; // 如果没有找到，返回null
    }

    public Integer getValue() {
        return value;
    }

    public String getTitle() {
        return title;
    }
}
